package com.cc.demo.service;

import com.cc.demo.entity.Inventory;
import com.cc.demo.repository.InventoryRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@RequiredArgsConstructor
public class InventoryService {

    private final InventoryRepository inventoryRepository;

    @Transactional
    public Inventory addInventory(Inventory inventory) {
        return inventoryRepository.save(inventory);
    }

}
